package org.yhtch.jswtdic.res;

import java.util.ResourceBundle;

import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.graphics.Image;

public class R {
	private R() {
	}

	private static R instant = null;

	public static R getR() {
		if (null == instant)
			instant = new R();
		return instant;
	}

	public Image getExitImage(Device d) {
		return new Image(d, this.getClass().getResourceAsStream("exit.png"));
	}

	public Image getLogoImage(Device d) {
		return new Image(d, this.getClass().getResourceAsStream("logo.png"));
	}

	public Image getNetImage(Device d) {
		return new Image(d, this.getClass().getResourceAsStream("net.png"));
	}

	public Image getShowImage(Device d) {
		return new Image(d, this.getClass().getResourceAsStream("show.png"));
	}

	public String getDicFilePath() {
		return "dics/dict.dat";
	}

	public String getStrRes(String key) {
		return ResourceBundle.getBundle("org.yhtch.jswtdic.res.strings")
				.getString(key);
		// return bundle.getString(key);
	}
}
